Skip to main content

Connect

AutomatR.MSSQLDataBase.Database.Connect

The "Connect" activity in AutomatR for SQL Server databases establishes a connection to a database using a standard connection string. This activity is fundamental for executing SQL queries and operations on the specified database.

Properties

NameDescription
Input
Authentication TypeSelect the type of authentication: Windows or SQL Server.
Data Base NameEnter the name of the database to which you want to connect.
PasswordEnter the password to authenticate the connection. (Optional, required for SQL Server Authentication)
SourceEnter the database system to retrieve data or establish a connection.
User NameEnter the username to authenticate the connection. (Optional, required for SQL Server Authentication)
Misc
DisplayNameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Connect" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
ConnectionReturns the database connection variable once the database connection is successful.

How to use:

  1. Drag and drop the "Connect" activity onto the workflow.
  2. Configure the properties by specifying the source, database name, and authentication details.
  3. Optionally, configure the delay for synchronization purposes.
  4. Execute the workflow to establish a connection to the specified database.

Example: Consider an example where the "Connect" activity is used to establish a connection to a SQL Server database named "DemoDB" using Windows Authentication:

Connect:
Source: "WIN-50GP30FGO75"
Data Base Name: "DemoDB"
Authentication Type: Windows Authentication
Connection: SqlConnectionVariable

In this example, the "Connect" activity connects to the SQL Server database "DemoDB" on the system "WIN-50GP30FGO75" using Windows Authentication. The successful connection is stored in the SqlConnection variable "SqlConnectionVariable" for further use in the workflow.